From 4037fac961bfbe3493007b01b4802f57334a48b4 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Sat, 24 Feb 2007 01:25:37 +0000 Subject: [PATCH] (utf-8-pre-write-conversion): Handle the case that BEG is a string. --- lisp/international/utf-8.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/international/utf-8.el b/lisp/international/utf-8.el index 2e4a2f6f49a..2d8791b49e3 100644 --- a/lisp/international/utf-8.el +++ b/lisp/international/utf-8.el @@ -1008,9 +1008,11 @@ Also compose particular scripts if `utf-8-compose-scripts' is non-nil." This is used as a post-read-conversion of utf-8 coding system." (if (and utf-translate-cjk-mode (not utf-translate-cjk-lang-env) - (save-excursion - (goto-char beg) - (re-search-forward "\\cc\\|\\cj\\|\\ch" end t))) + (if (stringp beg) + (string-match "\\cc\\|\\cj\\|\\ch" beg) + (save-excursion + (goto-char beg) + (re-search-forward "\\cc\\|\\cj\\|\\ch" end t)))) (utf-translate-cjk-load-tables)) nil) -- 2.30.2